<template>
	<view class="">
		<view class="list-box">
			<view class="store">
				<view class="store_size">店铺小票打印开关</view>
				<u-switch size="30" v-model="checked" active-color="#00c080"></u-switch>
			</view>
			<view class="store">
				<view class="store_size">店铺开票开关</view>
				<u-switch size="30" v-model="check" active-color="#00c080"></u-switch>
			</view>
			<view class="list">
				<view class="item" v-for="(item, index) in list" :key="index" @click="toPath(item)">
					<view class="store_size">
						{{ item.label }}
					</view>
					<view class="icon">
						<u-icon name="arrow-right" color="#999999"></u-icon>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				checked: false,
				check: false,
				list: [{
						label: '库存预警'
					},
					{
						label: '配送设置'
					},
					{
						label: '联系客服方式'
					},
					{
						label: '商铺退货联系信息'
					},
					{
						label: 'PC端店铺顶部通铺栏图'
					}
				]
			}
		},
		methods:{
			toPath(item){
				if(item.label == '库存预警'){
					uni.navigateTo({
						url:'/pages/store_settings/Inventory_alerts'
					})
				} else if(item.label == '配送设置'){
					uni.navigateTo({
						url:'/pages/store_settings/distribution'
					})
				} else if(item.label == '商铺退货联系信息'){
					uni.navigateTo({
						url:'/pages/store_settings/Return'
					})
				} else if(item.label == '联系客服方式'){
					uni.navigateTo({
						url:'/pages/store_settings/Return?label=kf'
					})
				} else if (item.label == 'PC端店铺顶部通铺栏图') {
					uni.navigateTo({
						url:'/pages/store_settings/shopImg'
					})
				}
			}
		}
	}
</script>
<style>
	page {
		background-color: #F4F5F7;
		box-sizing: border-box;
		padding: 0rpx 25rpx;
	}
</style>
<style scoped lang="scss">
	.list-box {
		padding: 0 31rpx;
		background-color: #FFF;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}
	.store{
		// margin-top: 20rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1rpx solid #F4F5F7;
		border-radius: 10rpx;
	}
	.store_size{
		font-size: 32rpx;
		font-weight: 500;
		line-height: 99rpx;
		color: #333333;
	}
	.list {
		
		.item {
			height: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-bottom: 1rpx solid #F4F5F7;
	
			.label {
				font-size: 32rpx;
				font-weight: 400;
				color: #333333;
			}
		}
	
		.item:last-child {
			border-bottom: 0;
		}
	}
</style>